package com.rlyy.basic.support;

import com.rlyy.common.param.Request;
import com.rlyy.common.response.Result;

/**
 * 拦截器
 *
 * @author yuanqinglong
 * @since 2021/9/13 10:17
 */
public interface InterceptionProcessor {


    /**
     * 之前的请求
     *
     * @param request 请求
     * @throws Exception 异常
     */
    default void beforeHandler(Request request) throws Exception {

    }


    /**
     * 业务执行后执行
     *
     * @param result      结果
     * @param request 完整的请求
     * @throws Exception 异常
     */
    default void postHandler(Request request, Result result) throws Exception {

    }

}
